Cytosim  PI
Cytoskeleton Simulator
How to compile cytosim

Cytosim is written in C++ and it is necessary to recompile the program after each modification of the source code.

This can be done from a command-line terminal, with a program called make, if you have a C++ standard compiler: e.g. gcc, Clang or the Intel compiler.

On Mac OS X, the easiest is to install Xcode, which is available on the Mac App Store. One need to install the Xcode 'Command-Line Tools', which is an optional package.

After installing the compiler and make, you need to edit the file makefile.inc to set the Compile Options options for your particular platform.

You can then compile with the following instructions:

make ready
make

Mathematical Libraries

sim and play require two mathematical libraries:

The reference implementations are public. However, since these libraries are coded in Fortran, you will need a Fortran compiler.

Precompiled libraries are also included in Intel MKL and Apple's vecLib .

These libraries are bundled with MacOSX and you simply need to specify:

-framework vecLib

Recent Linux distributions provide BLAS/LAPACK as an optional installation.

For troubleshooting, it can be helpful to compile the test programs to check the libraries:

make test_blas
make reader

Graphical Libraries

play relies on OpenGL for display and uses POSIX threads.

Interactivity is provided by GLUT, which can be replaced by freeGLUT. The OpenGL Utility Library (GLU) is also used, but it comes usually bundled with GLUT.

GLUT and OpenGL are included in Mac OSX:

-framework GLUT -framework OpenGL

If compilation fails, it can be helpful to compile the test programs:

make test_glut
make test_glapp
make test_thread

Optional Install

Cytosim can use the mouse wheel to zoom in and out:

This requires freeglut, or Renaud Blanch's GLUT patch on mac osx.

Compile Options

Dimensionality

The dimension of the simulation is selected in src/math/dim.h

#define DIM 2

Assertions

Assertions (a safety mechanism to speed up debugging) are turned on/off in src/base/assert_macro.h

//#define NDEBUG

Precision

The precision of the floating points numbers can be selected in src/math/real.h
//#define REAL_IS_FLOAT
double precision is strongly advised.

Compiler Options

Compiler options can be selected by editing the file makefile.inc. This file should be in the root of the distribution.Select the machine on which you want to compile:

MACHINE=mac
Select the compiler:

COMPILER=gcc
Select the mode:

MODE=F
To test new code, debug is the best, but to run extensive calculations, you should:

  • disable assertions,
  • compile with option fast

GIF support

You can install the GIF library (giflib) on your mac with macPorts:

sudo port install giflib
You can then enable GIF support in cytosim by editing the makefile.inc:

HAS_GIF = 1

PNG support

You can install the PNG library (libpnb) on your mac with macPorts:

sudo port install libpng
You can then enable PNG support by editing the makefile.inc:

HAS_PNG = 1

Documentation

The HTML documentation is built by doxygen Please, use doxygen 1.8 or better.